﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using Silvermoon.Controls;
using Silvermoon.Shapes;

namespace Silvermoon.Windows.Styles
{
    public class PickerStyle : Style
    {
        public PickerMode? Mode { get; set; }
        public bool? IsCyclic { get; set; }
        public Shape Lense { get; set; }
        public int? ItemHeight { get; set; }

        public override void Apply(Control c)
        {
            base.Apply(c);
            Picker picker = c as Picker;
            if (picker != null)
            {
                if (Mode != null) picker.Mode = Mode.Value;
                if (IsCyclic != null) picker.IsCyclic = IsCyclic.Value;
                if (Lense != null) picker.Lense = Lense;
                if (ItemHeight != null) picker.ItemHeight = ItemHeight.Value;
            }
        }
    }
}
